from pyecharts import options
from pyecharts.charts import Bar

sal = [12000,8000,13000,15000,16000]
city = ["北京","南昌","成都","上海","深圳"]
bar = Bar()
bar.add_xaxis(city)
bar.add_yaxis("月薪/元",sal)
bar.set_global_opts(title_opts=options.TitleOpts(title="各城市的平均薪水图",subtitle="单位/元"))
bar.render("baravg.html")
